from django.db import models
from common.db import BaseModel
from django.contrib.auth.models import AbstractUser


class User(AbstractUser, BaseModel):
    """用户模型"""
    mobile = models.CharField('手机号码', max_length=11, default='')
    avatar = models.ImageField('头像', upload_to='avatar/', default='avatar/default_avatar.png')
    nickname = models.CharField('用户昵称', max_length=20, default='')

    class Meta:
        db_table = 'users'
        verbose_name_plural = '用户表'


# class MyModel(models.Model):
#     name = models.CharField(max_length=50)
#     description = models.CharField(max_length=200)
#
#     class Meta:
#         db_table = 'my_table'
#         app_label = 'users'
